
package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/*
* 订单驱动补货
* 路由页面
* */
@Controller
@RequestMapping("/stock")
public class WmsDDQDBHouter {
    //主页面
//    @RequestMapping(value = "/toCkrb")
//    public String toCkrb() {
//        return "ckrb/ckrb";
//    }
    @Autowired
    SysMenuService menuService;

    //主页面
    @RequestMapping(value = "/orderReplenishment/{menu}")
    public String getgoods(@PathVariable("menu") String menu, Model model) {
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "stock/orderReplenishment";
    }
    // 新增补货单
    @RequestMapping(value = "/toAddWarrant")
    public String toStock() {
        System.out.println("222222222222");
        return "stock/AddWarrant";
    }
//    //查看补货单
    @RequestMapping(value = "/toWarrant")
    public String toWarrant(String id, Model model) {
        model.addAttribute("id",id);
        return "stock/Warrant";
    }
//    // 查看补货任务
    @RequestMapping(value = "/toSearchWarrant")
    public String toSearchWarrant(String id, Model model) {
        model.addAttribute("id",id);
        return "stock/searchWarrant";
    }
//    // 下发补货任务
    @RequestMapping(value = "/toIssueWarrant")
    public String toIssueWarrant(String id, Model model) {
        model.addAttribute("id",id);
        return "stock/IssueWarrant";
    }
//    // 去绑定库位组
//    @RequestMapping(value = "/toBlindLibraryGroup")
//    public String toBlindLibraryGroup(String hpid, Model model) {
//        model.addAttribute("hpid",hpid);
//        return "goods/blindLibraryGroup";
//    }
//    // 物料清单
//    @RequestMapping(value = "/toGoodsBom")
//    public String toGoodsBom(String id, Model model) {
//        model.addAttribute("id",id);
//        return "goods/goodsBom";
//    }
//    @RequestMapping(value = "toGoodAdd")
//    public String toGoodAdd(Model model, HttpSession session){
//        return  "goods/goodsAdd";
//    }
}
